FROM openjdk:8
MAINTAINER by wei.xu(wei.xu@venusource.com)

RUN echo "Asia/shanghai" > /etc/timezone;
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime;

RUN mkdir -p /data/
VOLUME /tmp
VOLUME /data/

ARG JAR_FILE
COPY ${JAR_FILE} /app.jar

ENV PROFILE="default"
ENV JAVA_OPTS=""

ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar --spring.profiles.active=$PROFILE" ]

EXPOSE 8080
